home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / MIDI_MAN / CMIDIPOR.H < prev    next >
Text File  |  1992-03-07  |  1KB  |  41 lines

  1. //--- CMIDIPort.h -----------------------------------------------------------
  2. // Copyright ⌐ Paul Ferguson, 1990, 1991, 1992.  All rights reserved.
  3. //
  4. // Description:
  5. //    Refer to the CMIDI Programmer's Manual for a complete desciption of
  6. //    these objects and methods.
  7. //    For use with THINK C 5.0 and the THINK Class Library.
  8. //
  9. //----------------------------------------------------------------------------
  10.  
  11. #pragma once
  12. #include "CMIDIClient.h"
  13.  
  14. class CMIDIPort : public CObject        // An abstract port, with methods and instance
  15. {                                        // variables common to all port objects.
  16. protected:                                // only called by subclass initializers
  17.  
  18.             OSErr    IMIDIPort(MIDIPortParams * portParams, short bufSize);
  19.  
  20. public:
  21.  
  22.     virtual    void    Dispose(void);
  23.     virtual    MIDIPortInfoHdl    GetPortInfo(void);
  24.     virtual    short    GetRefNum(void);
  25.     virtual    long    GetRefCon(void);
  26.     virtual    void    SetRefCon(long theRefCon);
  27.     virtual    void    GetPortName(StringPtr theName);
  28.     virtual    void    SetPortName(StringPtr theName);
  29.     virtual    OSErr    SavePatches(ResType theResType, short theResID);
  30.     virtual    void    SetConnectionProc(ProcPtr theConnectProc, long theRefCon);
  31.     virtual    void    GetConnectionProc(ProcPtr *    theConnectProc, long * theRefCon);
  32.  
  33. protected:
  34.  
  35.     short            itsRefNum;            // From AddPort()
  36.     OSType            itsPortID;            // Identifier in MIDI Manager
  37.     OSErr            itsResult;            // Used by SavePatches()
  38.     unsigned short    itsVersion;            // Save upper word of client version
  39. };
  40.  
  41. // end of CMIDIPort.h